package cn.itsource.pethome.system.employee.mapper;

import cn.itsource.pethome.base.mapper.BaseMapper;
import cn.itsource.pethome.system.employee.domain.Employee;
import cn.itsource.pethome.system.employee.domain.EmployeeBo;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author:R
 * @Date:2022/12/28 16:18
 * Description
 */
@Repository
public interface EmployeeMapper extends BaseMapper<Employee> {
    //查询不带敏感信息的全部
    List<EmployeeBo> findAllBo();

    /** 通过登录表id查询对应员工，然后查询角色id */
    Long findRoleIdByLogininfoId(Long id);

    /** 新增中间表数据 */
    void addEmpRole(Long empId, Long roleId);

    void updateRole(Long empId, Long roleId);

    void delRoleByEmpId(Long id);

    //通过登录表信息查询对应的员工
    EmployeeBo findByLoginId(Long id);
}
